package com.steak.orm.service.impl;

import com.steak.orm.builder.DeleteSQLBuilder;
import com.steak.orm.factory.SQLBuilderInstanceFactory;
import com.steak.orm.service.IDelete;
import com.steak.orm.datasource.JdbcTemplate;

import java.util.List;

/**
 * @author 刘牌
 * @Title:
 * @date 2022/3/413:56
 */
public class Delete<T> extends JdbcTemplate implements IDelete<T> {
    @Override
    public void delete(T t) throws Exception {
        String deleteSql = SQLBuilderInstanceFactory.getDeleteSQLBuilder().deleteSql(t);
        System.out.println(deleteSql);
        execute(deleteSql);
    }

    @Override
    public void deleteBatch(List<T> ts) {

    }
}
